/*
    
    @英雄hero
    @相关操作

*/

var hero= {
    x:canvas.width/2-33,
    y:canvas.height-82,
    w:66,
    h:82,
    showMax:4,
    showIndex:0,
    isBol:false,
    isOver:false,
    draw:function (){
        ctx.beginPath();
        if(this.isBol){
            this.showIndex++;
            if(this.showIndex>this.showMax){
                this.showIndex=this.showMax;
                this.isOver=true;
            }
        }
        ctx.drawImage(heroImg,this.w*this.showIndex,0,this.w,this.h,this.x,this.y,this.w,this.h)
    }
}
